﻿using System;
using System.Data;
using System.Collections;
using CE.Database;

/// <summary>
/// Summary description for TransferAXAVehicle

/// Table Name : [TransferAXAVehicle]
/// Created By : CX
/// Created Date : Tuesday, May 03, 2011
/// </summary>
/// 
namespace CE.Transfer
{

    public class TransferAXAVehicleDB
    {
        public TransferAXAVehicleDB()
        {	//TODO: Add constructor logic here

        }

        public Int64 Insert(TransferAXAVehicle transfer)
		{
			MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocInsert]";
			
			SortedList _sPara = new SortedList();
			
			#region Parameter			            
            _sPara.Add("@DESCRN", transfer.DESCRN);
            _sPara.Add("@RSKBAND", transfer.RSKBAND);
            _sPara.Add("@AAFLAG", transfer.AAFLAG);
            _sPara.Add("@AGNTNUM", transfer.AGNTNUM);
            _sPara.Add("@DBTACC", transfer.DBTACC);
            _sPara.Add("@DATEEFF", transfer.DATEEFF);
            _sPara.Add("@DATETER", transfer.DATETER);
            _sPara.Add("@ACTION", transfer.ACTION);
            _sPara.Add("@MMCODE", transfer.MMCODE);
            _sPara.Add("@ACCYR", transfer.ACCYR);
            _sPara.Add("@VHIRKGP", transfer.VHIRKGP);
            _sPara.Add("@BANDAGEG", transfer.BANDAGEG);
            _sPara.Add("@ACCTFLAG", transfer.ACCTFLAG);
            _sPara.Add("@AGEBAND", transfer.AGEBAND);
            _sPara.Add("@AINTYPE", transfer.AINTYPE);
            _sPara.Add("@ADMINREF", transfer.ADMINREF);
            _sPara.Add("@ACUMACCT", transfer.ACUMACCT);
            _sPara.Add("@DWH", transfer.DWH);
            _sPara.Add("@CEDREF", transfer.CEDREF);
            _sPara.Add("@BANDSA", transfer.BANDSA);
            _sPara.Add("@ZDEFVAL", transfer.ZDEFVAL);
            _sPara.Add("@AACCT", transfer.AACCT);
            _sPara.Add("@ACCOUNT", transfer.ACCOUNT);
            _sPara.Add("@CLMPAY", transfer.CLMPAY);
            _sPara.Add("@CLNTKEY", transfer.CLNTKEY);
            _sPara.Add("@COFAX", transfer.COFAX);
            _sPara.Add("@COPHONE", transfer.COPHONE);
            _sPara.Add("@DENTITY", transfer.DENTITY);
            _sPara.Add("@EMPNO", transfer.EMPNO);
            _sPara.Add("@CVRAGE", transfer.CVRAGE);
            _sPara.Add("@PREPOST", transfer.PREPOST);
            _sPara.Add("@REMIND", transfer.REMIND);
            _sPara.Add("@FACCT", transfer.FACCT);
            _sPara.Add("@ACLEVEL", transfer.ACLEVEL);
            _sPara.Add("@ACTN", transfer.ACTN);
            _sPara.Add("@INVREF", transfer.INVREF);
            _sPara.Add("@SPECIND", transfer.SPECIND);
            _sPara.Add("@ORDSTAT", transfer.ORDSTAT);
            _sPara.Add("@SPEQTIND", transfer.SPEQTIND);
            _sPara.Add("@ACCSRC", transfer.ACCSRC);
            _sPara.Add("@SECURITYNO", transfer.SECURITYNO);
            _sPara.Add("@ACENTITY", transfer.ACENTITY);
            _sPara.Add("@ALINE01", transfer.ALINE01);
            _sPara.Add("@ALINE02", transfer.ALINE02);
            _sPara.Add("@ALINE03", transfer.ALINE03);
            _sPara.Add("@PROVCAP", transfer.PROVCAP);
            _sPara.Add("@DCCCDE", transfer.DCCCDE);
            _sPara.Add("@ACCTSEL", transfer.ACCTSEL);
            _sPara.Add("@SEX", transfer.SEX);
            _sPara.Add("@ACCNUM", transfer.ACCNUM);
            _sPara.Add("@MRKNAME", transfer.MRKNAME);
            _sPara.Add("@ACCTCCY", transfer.ACCTCCY);
            _sPara.Add("@REFNUM", transfer.REFNUM);
            _sPara.Add("@AGREMARK", transfer.AGREMARK);
            _sPara.Add("@BLINE01", transfer.BLINE01);
            _sPara.Add("@BLINE02", transfer.BLINE02);
            _sPara.Add("@BLINE03", transfer.BLINE03);
            _sPara.Add("@PROVSTAT", transfer.PROVSTAT);
            _sPara.Add("@DCNCDE", transfer.DCNCDE);
            _sPara.Add("@ACREG", transfer.ACREG);
            _sPara.Add("@SEXTYP", transfer.SEXTYP);
            _sPara.Add("@ACCNO", transfer.ACCNO);
            _sPara.Add("@LICENCE", transfer.LICENCE);
            _sPara.Add("@ADDLFLD", transfer.ADDLFLD);
            _sPara.Add("@BOFDID", transfer.BOFDID);
            _sPara.Add("@AEDUSER", transfer.AEDUSER);
            _sPara.Add("@AGNTSEL", transfer.AGNTSEL);
            _sPara.Add("@AGTNM", transfer.AGTNM);
            _sPara.Add("@TOLITC", transfer.TOLITC);
            _sPara.Add("@ALIASFLD", transfer.ALIASFLD);
            _sPara.Add("@TTMPRCNO", transfer.TTMPRCNO);
            _sPara.Add("@ARCHTYPE", transfer.ARCHTYPE);
            _sPara.Add("@TRREFNUM", transfer.TRREFNUM);
            _sPara.Add("@ARCLIB", transfer.ARCLIB);
            _sPara.Add("@XMLENCDE", transfer.XMLENCDE);
            _sPara.Add("@AREADESC", transfer.AREADESC);
            _sPara.Add("@XOPTDSC", transfer.XOPTDSC);
            _sPara.Add("@APYPER", transfer.APYPER);
            _sPara.Add("@ATPROG", transfer.ATPROG);
            _sPara.Add("@ZACCTNO", transfer.ZACCTNO);
            _sPara.Add("@ASSESS", transfer.ASSESS);
            _sPara.Add("@ZAGENT", transfer.ZAGENT);
            _sPara.Add("@ARNAME", transfer.ARNAME);
            _sPara.Add("@BMETHOD", transfer.BMETHOD);
            _sPara.Add("@ZBUSREG", transfer.ZBUSREG);
            _sPara.Add("@BENCDE", transfer.BENCDE);
            _sPara.Add("@BNFSSUB", transfer.BNFSSUB);
            _sPara.Add("@ZCVRERR", transfer.ZCVRERR);
            _sPara.Add("@BNKACC", transfer.BNKACC);
            _sPara.Add("@ZDRVNMT", transfer.ZDRVNMT);
            _sPara.Add("@BRCHNAME", transfer.BRCHNAME);
            _sPara.Add("@BNKDSC", transfer.BNKDSC);
            _sPara.Add("@CHQNUM", transfer.CHQNUM);
            _sPara.Add("@SERVFLG", transfer.SERVFLG);
            _sPara.Add("@AGCLS", transfer.AGCLS);
            _sPara.Add("@ZBARCODE", transfer.ZBARCODE);
            _sPara.Add("@LNAM", transfer.LNAM);
            _sPara.Add("@TRANAREA", transfer.TRANAREA);
            _sPara.Add("@BRANCH", transfer.BRANCH);
            _sPara.Add("@CLNTNMXL", transfer.CLNTNMXL);
            _sPara.Add("@ZDOCNO", transfer.ZDOCNO);
            _sPara.Add("@CNTTYPE", transfer.CNTTYPE);
            _sPara.Add("@DVYCDE", transfer.DVYCDE);
            _sPara.Add("@ZREFA", transfer.ZREFA);
            _sPara.Add("@ARCCHDR", transfer.ARCCHDR);
            _sPara.Add("@ZBKPRCT", transfer.ZBKPRCT);
            _sPara.Add("@ZPRVRCT", transfer.ZPRVRCT);
            _sPara.Add("@Z4TODTE", transfer.Z4TODTE);

            #endregion
			
            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
		}

        public bool Update()
        {
            return true;
        }

        public bool Delete(Int64 id)
		{
			MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocDelete]";
			
			SortedList _sPara = new SortedList();	
			

            #region Parameter
            //_sPara.Add("@ID", id);
            //_sPara.Add("@ID2", id2);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result > 0;			
		}
        
    }
}



